<?php

namespace App\Models;

/**
 * App\Models\ExpressCompany
 *
 * @property int $id
 * @property string|null $name 快递公司名称
 * @property string|null $code 快递公司代码（快递100查询用）
 * @property int|null $sorts 排序（大靠前）
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @method static \Illuminate\Database\Eloquent\Builder|ExpressCompany newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|ExpressCompany newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|ExpressCompany query()
 * @method static \Illuminate\Database\Eloquent\Builder|ExpressCompany whereCode($value)
 * @method static \Illuminate\Database\Eloquent\Builder|ExpressCompany whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|ExpressCompany whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|ExpressCompany whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|ExpressCompany whereSorts($value)
 * @method static \Illuminate\Database\Eloquent\Builder|ExpressCompany whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class ExpressCompany extends Base
{
    protected $table = 'express_company';

    // 获取下拉框的列表
    static function getListSelect()
    {
        return self::orderByDesc('sorts')->get(['id', 'name']);
    }
}
